In [1]:
from ipywidgets import interact, interactive, fixed, interact_manual
import ipywidgets as widgets
from gtts import gTTS
import matplotlib
import numpy 
from traitlets.config.manager import BaseJSONConfigManager
path = "/Users/Kristen/anaconda3/envs/py36/etc/jupyter/nbconfig"
cm = BaseJSONConfigManager(config_dir=path)
cm.update("livereveal", {"autolaunch": True,
                         "theme": "sky",
                        } 
)   

#Supress default INFO logging


# The UT Dallas Art Science Lab Training module 
print ("Sonification Training Module v0.5.2")
print("\nDeveloped by the ArtSciLab at UT Dallas")
print("\n")
print("Sonification Module Orientation" )
print("\n")
print("\nBasic Instructions for each cell :")
print('1. Press Shift + Enter to initiate display')
print("2. Press Space Bar to proceed to the next cell")


Sonification Training Module v0.5.2

Developed by the ArtSciLab at UT Dallas


Sonification Module Orientation



Basic Instructions for each cell :
1. Press Shift + Enter to initiate display
2. Press Space Bar to proceed to the next cell

In [23]:
print("Please put on your best headphones and set the system volume to a comfortable level")
print("\n")
print("Volume controls are located in the top row of the keyboard if you need to adjust the volume at any time")


Please put on your best headphones and set the system volume to a comfortable level


Volume controls are located in the top row of the keyboard if you need to adjust the volume at any time

In [3]:
%%HTML
# Press Shift+Enter and click Play to watch the video

<video width="640" height="480" controls>
  <source src="dep/videos/Listening_TestV2.mp4" type="video/mp4">
</video>
</br>
<b>   When you have completed the video, press Space Bar to proceed</b>


# Press Shift+Enter and click Play to watch the video When you have completed the video, press Space Bar to proceed

In [21]:
from ipywidgets import interact, interactive, fixed, interact_manual
import ipywidgets as widgets
import gtts as gTTS
# Make sure and hit "Shift + Enter" if you have not yet
print("Could you hear sound on both headphones?")
yesno=['Yes','No']
button1 = widgets.Button(description = yesno[0])
button2 = widgets.Button(description = yesno[1])
#tts = gTTS(text=name+' Do you have a hearing disability? Click Yes or No', lang='en')
#tts.save("answer.mp3") 
#os.system("afplay answer.mp3")
container = widgets.HBox(children=[button1,button2])
display(container)

    
def on_button1_clicked(b):
    choice = b.description
    b.color = 'white'
    #tts = gTTS(text='Great. Please use the scroll on the lower right corner to proceed on to the next section', lang='en')
    #tts.save("answer.mp3") 
    #os.system("afplay answer.mp3")
    #clear_output()
    print("Great. Press Space Bar to proceed")
        
def on_button2_clicked(b):
    # [insert code to record choice] 
    #tts = gTTS(text='Please check your system sound settings and headphones & try again', lang='en')
    #tts.save("answer.mp3") 
    #os.system("afplay answer.mp3")
    container.close()
    #clear_output()
    print("Please check your system sound settings & headphones then start afresh")

button1.on_click(on_button1_clicked)
button2.on_click(on_button2_clicked)


Could you hear sound on both headphones?
Please check your system sound settings & headphones then start afresh

Please take a moment to evaluate your hearing with this online test:

ONLINE HEARING TEST link - click here

Press Space Bar to proceed to the final slide of this orientation

You have completed the Sonification Module Orientation

Now you have an idea of what is involved in using these notebooks. In the upcoming modules you will be interacting with actual code that converts data into sound! They will proceed in a format of educating the listener, then giving a chance to explore and understand, followed by a set of simple game-like interactions. Enjoy (:

Please close this tab and open the next module from the list of notebooks:

2. Full or Empty Training Module